module.exports = {
  open:false,
  description:'根据用户IDS获取会话',
  handler(req,res,next){
    let doc = req.body;
    let fromID = doc.fromID;
    let toID = doc.toID;
    let talkerIDArray = [fromID,toID].sort();
    req.mongo.collection("conversation").find({"talkerIDArray":talkerIDArray}).next((e,r)=>{
      if(e) return res.err.mongoError(e);
      if(!r) return res.reply({code:1,message:"未找到conversationID",result:null});
      return res.reply({code:0,message:"找到conversationID",result:r._id})
    })
  }
}